<template>
  <div class="operatingBitstyle">
    <!-- 标题 -->
    <h2>{{ datas.text }}</h2>
    <!-- 类型选择 -->
    <span style="font-weight:bold;">组件高度：{{ datas.componHight}}</span>
    <div class="placeHolderstyle">
      <p>选择链接：</p>
      <div class="opText">
        <select-link @selectThisLink="selectThisLink" @clearThisLink="clearThisLink" :linktypeurl="datas.apiUrl" />
      </div>
    </div>
  </div>
</template>

<script>
import SelectLink from "../../../selectLink";
export default {
  name: "OperatingBitstyle",
  components: { SelectLink },
  props: {
    datas: Object,
  },
  data() {
    return {
      interurl: "",
    };
  },
  methods: {
    selectThisLink(resu) {
      this.datas.apiUrl = resu.url;
    },
    clearThisLink (index) {
      this.datas.apiUrl = '';
    }
  },
  created() {
    this.interurl = this.datas.apiUrl;
  },
};
</script>

<style scoped lang="scss">
.operatingBitstyle {
  width: 100%;
  position: absolute;
  left: 0;
  top: 0;
  padding: 0 10px 20px;
  box-sizing: border-box;
  /* 标题 */
  h2 {
    padding: 24px 16px 24px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #f2f4f6;
    font-size: 18px;
    font-weight: 600;
    color: #323233;
  }
  .placeHolderstyle {
    padding: 10px 0;
    p {
      display: block;
      margin-bottom: 10px;
    }
  }
}
</style>
